package homework0322;

import java.util.Scanner;

public class Homework4_8 {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int number = scan.nextInt();
		int bit = 0;
		for (; number != 0; number /= 10) {
			System.out.println(number % 10);
			bit++;
		}
		System.out.println(bit);
	}
}